package com.yf.common.response;

import lombok.Data;
import org.loulan.application.dragon.common.core.base.BaseStorage;
import org.loulan.application.dragon.common.core.config.status.ResponseStatus;

import java.io.Serializable;

/*********************************************************
 ** 返回数据的基础样式
 ** <br><br>
 ** Date: Created in 2022/6/26 20:02
 ** @author loulan
 ** @version 0.0.0
 *********************************************************/
@Data
public class BaseResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    //返回数据的状态码，默认200
    private Integer status = ResponseStatus.OK;
    //返回的信息
    private String msg = "成功";
    // 任务id
    private String taskId;

    public BaseResponse(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
        this.taskId = BaseStorage.getTaskId();
    }

    public BaseResponse() {
        this.taskId = BaseStorage.getTaskId();
    }
}
